package com.samsungmobile.security;

import java.security.MessageDigest;

import sun.misc.BASE64Encoder;

public class MD5Manager {

	/**
	 * MD5�� �̿��� ��Ʈ�� ��ȯ.
	 * @param strPWD
	 * @return strConvertPWD
	 * @throws Exception
	 */
	public static String getMD5(String strPWD) throws Exception {
        MessageDigest md = MessageDigest.getInstance("MD5");
        byte[] bDigest   = md.digest(strPWD.getBytes());

        BASE64Encoder b64e   = new BASE64Encoder();
        String strConvertPWD = b64e.encode(bDigest);

  	  	return strConvertPWD;
    }
}
